package com.yd;

import com.doman.PayOrders;
import com.resultmsg.BaseEnums;
import com.resultmsg.Result;
import com.resultmsg.Results;
import com.server.PayOrdersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RequestMapping(value = "/educloud")
@RestController
public class PayOrdersController {

    @Autowired
    private PayOrdersMapper payOrdersMapper;

    @RequestMapping(value = "/payMoHu" ,method = RequestMethod.POST)
    public Result payMoHu(@RequestBody  PayOrders payOrders) {
        List<PayOrders> payOrders1 = payOrdersMapper.selectByPrimaryMoHu(payOrders);
        if(payOrders1.size() > 0){
            return Results.successWithData(payOrders1,BaseEnums.SUCCESS.code(), BaseEnums.SUCCESS.desc());
        }
        return Results.failureWithData("",BaseEnums.FORBIDDEN.code(), BaseEnums.FORBIDDEN.desc());
    }




}
